import java.util.Scanner;

public class CountOfOneBits {

	public static void main(String[] args) {

		Scanner inputConsoleStream = new Scanner(System.in);
		int userInput = inputConsoleStream.nextInt();
		inputConsoleStream.close();

        int onesBitCounter = 0;

        for (int i = 0; i < 32; i++)
        {
            boolean isBitOne = ((userInput >> i) & 1) == 1;

            if (isBitOne == true)
            {
            	onesBitCounter++;
            }
        }
        
        System.out.println(onesBitCounter);
	}
}